package y23.Jun;

import java.util.Scanner;

//写一个数二进制序列中所有的偶数位和奇数位，分别输出二进制序列
public class Test8 {
    public static void main(String[] args) {
        int i = 0;
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            int n = sc.nextInt();
            System.out.println("奇数是：");
            for(i = 31; i >= 1; i -= 2){
                System.out.print(((n>>i)&1) + " ");
            }
            System.out.println();
            System.out.println("偶数是：");
            for(i = 30; i >= 0; i -= 2){
                System.out.print(((n>>i)&1) + " ");
            }
        }
    }
}
